<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${config.siteName}后台系统</title>
<link href="/assets/images/favicon.ico" rel="shortcut icon"
	type="image/x-icon">
<link href="/assets/static/font-awesome-4.7.0/css/font-awesome.min.css"
	rel="stylesheet" type="text/css">
<link href="/assets/static/bootstrap-3.3.7/css/bootstrap.min.css"
	rel="stylesheet">
<link href="/assets/css/jquery-confirm.min.css" rel="stylesheet">
<link href="/assets/static/fancybox/jquery.fancybox.min.css"
	rel="stylesheet">
<link href="/assets/static/nprogress/nprogress.css" rel="stylesheet">
<link href="/assets/static/toastr/toastr.min.css" rel="stylesheet">
<link href="/assets/static/icheck-1.x/skins/square/green.css"
	rel="stylesheet">
<link href="/assets/static/x-editable-1.5.1/css/bootstrap-editable.css"
	rel="stylesheet">
<link href="/assets/static/bootstrap-table/bootstrap-table.min.css"
	rel="stylesheet">
<link
	href="/assets/static/bootstrap-daterangepicker/daterangepicker.css"
	rel="stylesheet">
<link
	href="/assets/static/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css"
	rel="stylesheet">
<link
	href="/assets/static/bootstrapvalidator-0.5.3/css/bootstrapValidator.min.css"
	rel="stylesheet">
<link href="/assets/static/zTree_v3/css/metroStyle/metroStyle.css"
	rel="stylesheet">
<link href="/assets/static/bootstrap-fs-modal/dist/css/fs-modal.min.css"
	rel="stylesheet">
<link href="/assets/css/yyl.core.css" rel="stylesheet">

<script type="text/javascript">
    var appConfig = {
        qiniuPath: '${config.qiuniuBasePath}',
        qiniuImgStyle: '-pw',
        wwwPath: '${config.siteUrl}',
        staticPath: '${config.staticWebSite}'
    }
    
	</script>
<script src="/assets/js/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="/assets/static/bootstrap-3.3.7/js/bootstrap.min.js"
	type="text/javascript"></script>
<script src="/assets/static/jquery_lazyload/jquery.lazyload.min.js"
	type="text/javascript"></script>
<script src="/assets/js/jquery-confirm.min.js" type="text/javascript"></script>
<script src="/assets/static/fancybox/jquery.fancybox.min.js"
	type="text/javascript"></script>
<script src="/assets/static/mustache/mustache.min.js"
	type="text/javascript"></script>
<script src="/assets/static/js-xss/dist/xss.min.js"
	type="text/javascript"></script>
<script src="/assets/static/nprogress/nprogress.js"></script>
<script src="/assets/static/toastr/toastr.min.js"></script>
<script src="/assets/static/icheck-1.x/icheck.min.js"></script>
<script
	src="/assets/static/x-editable-1.5.1/js/bootstrap-editable.min.js"></script>
<script src="/assets/static/bootstrap-table/bootstrap-table.min.js"></script>
<script
	src="/assets/static/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script
	src="/assets/static/bootstrap-table/extensions/editable/bootstrap-table-editable.min.js"></script>
<script src="/assets/static/bootstrap-daterangepicker/moment.min.js"></script>
<script
	src="/assets/static/bootstrap-daterangepicker/daterangepicker.js"></script>
<script
	src="/assets/static/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script
	src="/assets/static/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script
	src="/assets/static/bootstrapvalidator-0.5.3/js/bootstrapValidator.min.js"></script>
<script
	src="/assets/static/bootstrap-progressbar/bootstrap-progressbar.js"></script>
<script
	src="/assets/static/bootstrap-progressbar/bootstrap-progressbar.js"></script>
<script src="/assets/static/zTree_v3/js/jquery.ztree.core.min.js"></script>


<script src="/assets/static/bootstrap-fs-modal/dist/js/fs-modal.min.js"></script>
<script src="/assets/js/validator.js"></script>
<script src="/assets/js/ajaxfileupload.js"></script>
<script src="/assets/js/jquery-form.js"></script>
<!-- <script src="/assets/js/yyl.core.js"></script> -->
</head>
<body class="nav-md">

	<div class="clearfix"></div>
	<div class="x_panel" id="x_panel_id">
		<div class="x_title">
			<h3 class="display-5 text-center">叶老师评估咨询—个案基本资料表</h3>
			<div class="clearfix"></div>
		</div>
		<div class="x_content">
			<form id="addOrUpdateForm" class="form-horizontal form-label-left" novalidate>
				<input type="hidden" name="id"> 
				<input type="hidden" name="extEvaluation">
				<input type="hidden" name="childId">
				<div class="panel panel-default">
					<div class="panel-heading">基本资料</div>
					<div class="panel-body">

						<div class="item form-group">
							<!-- <label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="childId">孩子编号: *</label>
							<div class="col-md-4 col-sm-3 col-xs-12">
								<input type="text" class="form-control col-md-7 col-xs-12"
									name="childId" id="childId" required="required"
									placeholder="请输入孩子编号" />
							</div> -->

							<label class="control-label col-md-1 col-sm-1 col-xs-12" for="childName">孩子姓名:*</label>
							<div class="col-md-4 col-sm-3 col-xs-12">
								<input type="text" class="form-control col-md-7 col-xs-12" name="childName" id="childName"  placeholder="请输入用户名" />
							</div>

						</div>


						<div class="item form-group">
							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="sex">性别:*</label>
							<div class="col-md-4 col-sm-3 col-xs-12">
								<ul class="list-unstyled list-inline">
									<li>
										<div class="radio">
											<label> <input type="radio" class="square" name="sex" value="0" > 男
											</label>
										</div>
									</li>
									<li>
										<div class="radio">
											<label> <input type="radio" class="square" name="sex" value="1" > 女
											</label>
										</div>
									</li>

								</ul>
							</div>


							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="birthday">出生日期 :*</label>
							<div class="col-md-4 col-sm-3 col-xs-12">
									<input type='text' class="form-control"  id="birthday" name="birthday" placeholder="请输入出生日期" />
							</div>

						</div>


						<div class="item form-group">
							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="mobile">母亲: </label>
							<div class="col-md-2 col-sm-2 col-xs-12">
								<input type="text" class="form-control col-md-7 col-xs-12"
									name="monther" id="monther" placeholder="请输入母亲姓名" />
							</div>
							<div class="col-md-2 col-sm-2 col-xs-12">
								<input type="tel" class="form-control col-md-7 col-xs-12"
									name="mobile" id="mobile" data-validate-length-range="6,20"
									placeholder="请输入手机号" />
							</div>

							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="phone">父亲:</label>
							<div class="col-md-2 col-sm-2 col-xs-12">
								<input type="text" class="form-control col-md-7 col-xs-12"
									name="father" id="father" placeholder="请输入父亲姓名" />
							</div>
							<div class="col-md-2 col-sm-2 col-xs-12">
								<input type="tel" class="form-control col-md-7 col-xs-12"
									name="phone" id="phone" data-validate-length-range="6,20"
									placeholder="请输入手机号" />
							</div>

						</div>

						<div class="item form-group">
							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="email">邮箱:*</label>
							<div class="col-md-4 col-sm-3 col-xs-12">
								<input type="email" class="form-control col-md-7 col-xs-12"
									name="email"  id="email" placeholder="请输入邮箱,用来发送电子评估表" />
							</div>

							<label class="control-label col-md-1 col-sm-1 col-xs-12" for="qq">QQ/微信:</label>
							<div class="col-md-4 col-sm-3 col-xs-12">
								<input type="text" class="form-control col-md-7 col-xs-12"
									name="qq" id="qq" placeholder="请输入QQ或者微信号" />
							</div>

						</div>
						<div class="item form-group">
							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="address">地址:*</label>
							<div class="col-md-9 col-sm-9 col-xs-12">
								<textarea class="form-control col-md-7 col-xs-12" name="address"
									id="address"  placeholder="请输入地址" rows="8"></textarea>
							</div>
						</div>

					</div>
				</div>

				<div class="panel panel-default">
					<div class="panel-heading">医生诊断</div>
					<div class="panel-body">
						<div class="item form-group">

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-fych"> <input type="checkbox"
										class="square" id="EXT-fych" name="EXT-fych"> 发育迟缓
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox" >
									<label for="EXT-naotan"> <input type="checkbox" class="square"
										id="EXT-naotan" name="EXT-naotan"> 脑瘫
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-zibizheng"> <input type="checkbox"
										class="square" id="EXT-zibizheng" name="EXT-zibizheng">
										自闭症
									</label>
								</div>
							</div>

							<div class="col-md-6 col-sm-6 col-xs-12">
								<div class="checkbox">
									<label for="EXT-hanjian"> 
										 <span style="display:block;float:left;"><input type="checkbox" class="square" id="EXT-hanjian" name="EXT-hanjian">罕见疾病</span>
										 <span style="display:block;float:left;"><input type="text" id="EXT-hanjian-Text" name="EXT-hanjian-Text"></span>
									</label>
								</div>
							</div>
						</div>
					</div>
				</div>




				<div class="panel panel-default">
					<div class="panel-heading">内科疾病</div>
					<div class="panel-body">
						<div class="item form-group">
							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-none"> <input type="checkbox"
										class="square" id="EXT-none" name="EXT-none"> 无
									</label>
								</div>
							</div>

							<div class="col-md-6 col-sm-6 col-xs-12">
								<div class="checkbox">
									<span style="display:block;float:left;"><input type="checkbox" class="square" id="EXT-dianxian" name="EXT-dianxian">癫痫症 （</span>
									<span style="display:block;float:left;"> <input type="checkbox" class="square" id="EXT-fuyao" name="EXT-fuyao">服药中:
									<input tabindex="5" type="text" id="EXT-fuyao-Text" name="EXT-fuyao-Text"></span>
									<span style="display:block;float:left;"><input type="checkbox" class="square" id="EXT-noneyao" name="EXT-noneyao">未服药）</span>
									

								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-heartdis"> <input type="checkbox"
										class="square" id="EXT-heartdis" name="EXT-heartdis">
										心脏病
									</label>
								</div>
							</div>

						</div>
					</div>
				</div>


				<div class="panel panel-default">
					<div class="panel-heading">相关能力</div>
					<div class="panel-body">
						<div class="item form-group">
							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="language">语言:*</label>
							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-language-none"> <input type="checkbox"
										class="square" id="EXT-language-none" name="EXT-language-none">
										无
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-language-low"> <input type="checkbox"
										class="square" id="EXT-language-low" name="EXT-language-low">
										差
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-language-exce"> <input type="checkbox"
										class="square" id="EXT-language-exce" name="EXT-language-exce">
										构音异常
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-language-norm"> <input type="checkbox"
										class="square" id="EXT-language-norm" name="EXT-language-norm">
										正常
									</label>
								</div>
							</div>

						</div>


						<div class="item form-group">
							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="listen">听觉:*</label>
							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-listen-norm"> <input type="checkbox"
										class="square" id="EXT-listen-norm" name="EXT-listen-norm">
										正常
									</label>
								</div>
							</div>

							<div class="col-md-7 col-sm-7 col-xs-12">
								<div class="checkbox">
										<span style="display:block;float:left;"><input type="checkbox" class="square" id="EXT-listen-exce" name="EXT-listen-exce">异常 ；</span>
										<span style="display:block;float:left;">左耳<input type="text" class="square" id="EXT-listen-left-Text" name="EXT-listen-left-Text">分贝;</span>
										<span style="display:block;float:left;">右耳<input type="text" class="square" id="EXT-listen-right-Text" name="EXT-listen-right-Text">分贝</span>
									
								</div>
							</div>

						</div>


						<div class="item form-group">
							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="look">视觉:*</label>
							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-look-norm"> <input type="checkbox"
										class="square" id="EXT-look-norm" name="EXT-look-norm">
										正常
									</label>
								</div>
							</div>

							<div class="col-md-6 col-sm-6 col-xs-12">
								<div class="checkbox">
									<input type="checkbox" class="square" id="EXT-look-exec" name="EXT-look-exec">
										异常（ 
									<input type="checkbox" class="square" id="EXT-look-xieshi" name="EXT-look-xieshi">
										斜视 
									<input type="checkbox" class="square" id="EXT-look-week" name="EXT-look-week">弱势）
								</div>
							</div>

						</div>

					</div>
				</div>



				<div class="panel panel-default">
					<div class="panel-heading">评估服务</div>
					<div class="panel-body">
						<div class="item form-group">
							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="action">动作操作摄影:*</label>
							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-family-shot"> <input type="checkbox"
										class="square" id="EXT-family-shot" name="EXT-family-shot">
										家人自行拍摄
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-company-shot"> <input type="checkbox"
										class="square" id="EXT-company-shot" name="EXT-company-shot">
										单位代为拍摄
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-none-shot"> <input type="checkbox"
										class="square" id="EXT-none-shot" name="EXT-none-shot">
										不拍摄
									</label>
								</div>
							</div>
						</div>



						<div class="item form-group">
							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="course">家长培训课程:*</label>
							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-course-one"> <input type="checkbox"
										class="square" id="EXT-course-one" name="EXT-course-one">
										一次
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-course-two"> <input type="checkbox"
										class="square" id="EXT-course-two" name="EXT-course-two">
										二次
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-course-three"> <input type="checkbox"
										class="square" id="EXT-course-three" name="EXT-course-three">
										三次
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-course-none"> <input type="checkbox"
										class="square" id="EXT-course-none" name="EXT-course-none">
										都不需要
									</label>
								</div>
							</div>

						</div>


						<div class="item form-group">
							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="train">评估后辅导操作课程:*</label>
							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-train-halfmonth"> <input
										type="checkbox" class="square" id="EXT-train-halfmonth"
										name="EXT-train-halfmonth"> 半个月一次
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-train-month"> <input type="checkbox"
										class="square" id="EXT-train-month" name="EXT-train-month">
										一个月一次
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-train-none"> <input type="checkbox"
										class="square" id="EXT-train-none" name="EXT-train-none">
										不需要
									</label>
								</div>
							</div>
						</div>

						<div class="item form-group">
							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="actionupdate">愿意定期评估动作修正服务:*</label>
							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-actionupdate-month"> <input
										type="checkbox" class="square" id="EXT-actionupdate-month"
										name="EXT-actionupdate-month"> 一个月一次
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-actionupdate-twomonth"> <input
										type="checkbox" class="square" id="EXT-actionupdate-twomonth"
										name="EXT-actionupdate-twomonth"> 两个月一次
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-actionupdate-none"> <input
										type="checkbox" class="square" id="EXT-actionupdate-none"
										name="EXT-actionupdate-none"> 不需要
									</label>
								</div>
							</div>
						</div>

						<div class="item form-group">
							<label class="control-label col-md-1 col-sm-1 col-xs-12"
								for="phonereturn">愿意定期疗育电话回访服务:*</label>
							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-phonereturn-month"> <input
										type="checkbox" class="square" id="EXT-phonereturn-month"
										name="EXT-phonereturn-month"> 一个月一次
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-phonereturn-twomonth"> <input
										type="checkbox" class="square" id="EXT-phonereturn-twomonth"
										name="EXT-phonereturn-twomonth"> 两个月一次
									</label>
								</div>
							</div>

							<div class="col-md-2 col-sm-2 col-xs-12">
								<div class="checkbox">
									<label for="EXT-phonereturn-none"> <input
										type="checkbox" class="square" id="EXT-phonereturn-none"
										name="EXT-phonereturn-none"> 不需要
									</label>
								</div>
							</div>
						</div>

						<div class="item form-group">
							<h4><label class="col-md-12 col-sm-12 col-xs-12"  style="text-align:center">教育倡导及咨询：请加入神经平衡疗法————北京家长群。微信号：NDBTSYEH</label></h4>
							
						</div>

					</div>
				</div>


			</form>
		</div>
		<div class="x_footer" style="text-align:center">
			<button type="button" class="btn btn-success addOrUpdateBtn">
				<i class="fa fa-save"> 提交</i>
			</button>
		</div>
	</div>

	<script type="text/javascript">
    
	function s4(){
    	return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
    }
    function uuid(){
    	return (s4()+s4()+""+s4()+s4()+s4()+s4()+s4()+s4());
    }
    
	$(function () {
    	
    	  
		$("input[type=checkbox], input[type=radio]").iCheck({
	        checkboxClass: 'icheckbox_square-green',
	        radioClass: 'iradio_square-green',
	        increaseArea: '20%' // optional
	    });
		
		$("input[type=checkbox], input[type=radio]").on('ifChecked', function(event){
			 $('#addOrUpdateForm').data('bootstrapValidator').updateStatus('sex', 'NOT_VALIDATED',null).validateField('sex');
		});
    	  $("input[name='childId']").attr('value',uuid());
    	   $('#birthday').datetimepicker({
    			 language:  'zh-CN',  
    			 minView: "month",//设置只显示到月份
    		     format: 'yyyy-mm-dd',
              ignoreReadonly: true,
              allowInputToggle: true,
              autoclose:true,//选中关闭
              pickerPosition: "bottom-left"
          }).on('hide',function(e) {               
        	   $('#addOrUpdateForm').data('bootstrapValidator').updateStatus('birthday', 'NOT_VALIDATED',null).validateField('birthday');           
        	});

    	   
    	   
    	   $('#addOrUpdateForm').bootstrapValidator({
    	        live: 'enabled',
    	        message: '值不是有效的',
    	        feedbackIcons: {
    	            valid: 'glyphicon glyphicon-ok',
    	            invalid: 'glyphicon glyphicon-remove',
    	            validating: 'glyphicon glyphicon-refresh'
    	        }, 
    	        submitButtons: '.addOrUpdateBtn',
    	        fields: {
    	            childName: {
    	                validators: {
    	                    notEmpty: {
    	                        message: '孩子姓名不能为空！'
    	                    }
    	                }
    	            },
    	            sex: {
    	                validators: {
    	                    notEmpty: {
    	                        message: '性别不能为空'
    	                    }
    	                }
    	            }, 
    	            email: {
    	                validators: {
    	                	notEmpty: {
    	                        message: '邮箱不能为空！'
    	                    },
    	                    emailAddress: {
    	                        message: '邮箱格式不对'
    	                    }
    	                }
    	            },
    	            birthday: {
    	                validators: {
    	                	notEmpty: {
    	                        message: '出生日期不能为空！'
    	                    },
    	                	date: {
    	                        format: 'YYYY-MM-DD',
    	                        message: '日期格式不对(YYYY-MM-DD)'
    	                    }
    	                }
    	            },
    	            address :{
    	            	validators: {
    	                    notEmpty: {
    	                        message: '地址不能为空!'
    	                    }
    	                }
    	            }
    	        }
    	    });
    	   
    });
    
	function setCookie(c_name, value, expiredays) {
	    var exdate = new Date();　　　　
	          exdate.setDate(exdate.getDate() + expiredays);　　　　
	    document.cookie = c_name + "=" + escape(value) + ((expiredays == null) ? "": ";expires=" + exdate.toGMTString());
	}

	function getCookie(c_name) {
	    var that = this;　　　　
	    if (document.cookie.length > 0) {
	        c_start = document.cookie.indexOf(c_name + "=")
	        if (c_start != -1) {
	            c_start = c_start + c_name.length + 1;
	            c_end = document.cookie.indexOf(";", c_start);

	            if (c_end == -1){
	                c_end = document.cookie.length;
	            }
	            return unescape(document.cookie.substring(c_start, c_end))　　 
	        }　　　　
	    }　　　　
	    return ""　　
	}

    
    $(".addOrUpdateBtn").click(function () {
    	
    	/* $('#addOrUpdateForm').bootstrapValidator('validate');
		var valid = true;
    	 $('#addOrUpdateForm').find("small").each(function(){
             if($(this).attr("data-bv-result") == "INVALID"){
            	 valid= false;
             }
         });
    	 
    	if(!valid){
    		return false;
    	}   */
    	
        $('#addOrUpdateForm').data('bootstrapValidator').validate(); 
        if(!$('#addOrUpdateForm').data('bootstrapValidator').isValid()){
        	return false;
        }
            
    	if(getCookie("bjhuici_eval_question")=="on"){
            $.alert({
                title: '友情提示',
                content: '当前评估咨询记录已提交,不要重复提交！',
                autoClose: "ok|3000",
                buttons: {
                	ok: {
                        text: "关闭",
                        btnClass: 'btn-success',
                        keys: ['enter'],
                        action: null
                    }
                }
            });
    		return false;
    	}
    	var t = $('#addOrUpdateForm').serializeArray();
        var d={};
        $.each(t, function() {
          if(this.name.indexOf("EXT-") != -1){
        	  if(this.name.indexOf("-Text") != -1 && this.value!=""){
        		  d[this.name] = this.value;
              }else if(this.name.indexOf("-Text") == -1){
            	  d[this.name] = 'check';
              }
        	  
          }
          
        });
        if($("input[name='extEvaluation']")){
        	$("input[name='extEvaluation']").attr('value',JSON.stringify(d));
        }
        if (validator.checkAll($("#addOrUpdateForm"))) {
            $.ajax({
                type: "post",
                url: '/publish/34f74ee6-bc02-4458-a245-a3d82a7af9f3',
                data: $("#addOrUpdateForm").serialize(),
                success: function (json) {
                   // $.alert.ajaxSuccess(json);
                   setCookie('bjhuici_eval_question','on',1);
                   $(".addOrUpdateBtn").attr('disabled',true);;
                	window.location.href='/publish/evalregresult';
                },
                error: function(info){
                	
                }
            });
        }
    })
	</script>

</body>
</html>
